package bomber.model;

import java.awt.Color;
import javax.swing.JToggleButton;


public class GameButton extends JToggleButton implements IGameButton {

	private static final long serialVersionUID = 1L;
	private String butText;
	private String butTextOn;
	private Color butColorOn;

	public GameButton(GameButtonSet set) {
		this.butText = set.getText();
		this.butTextOn = set.getTextOn();
		this.butColorOn = set.getColor();

		this.initView();
	}

	private void initView() {
		super.setText(this.butText);
		super.setSize(getMaximumSize());
	}

	public void initCheck() {
		this.setText(this.butTextOn);
		this.setBackground(this.butColorOn);

		this.setEnabled(false);
		this.setSelected(false);
	}

	public void setTextOn(String textOn) {
		this.butTextOn = textOn;
	}
}
